From: kfraser@localhost.localdomain Date: Fri, 14 Sep 2007 15:04:33 +0000 (+0100) Subject: Fix two memory leaks in xend. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14937^2~88 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=d6dec5a652d7fd1983def3ccd44081898ec81d34;p=xen.git Fix two memory leaks in xend. Signed-off-by: Kouya Shimura --- diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 93402b1e5b..d91b795636 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -346,6 +346,7 @@ static PyObject *pyxc_domain_getinfo(XcObject *self, Py_DECREF(list); if ( pyhandle != NULL ) { Py_DECREF(pyhandle); } if ( info_dict != NULL ) { Py_DECREF(info_dict); } + free(info); return NULL; } for ( j = 0; j < sizeof(xen_domain_handle_t); j++ ) diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index 45cbf773d9..b2c4b090e4 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -365,6 +365,7 @@ static PyObject *xspy_set_permissions(XsHandle *self, PyObject *args) goto exit; } + free(xsperms); Py_INCREF(Py_None); return Py_None;